//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<COffscreenRenderTarget9.h>
///	@path	~/src/graphics/dx9/
///	@date	2008/09/20
///	@desc	.

#pragma once

#include "xeres.h"

#include "graphics/dx9/CDevice9.h"
#include "graphics/dx9/CColorRenderTarget9.h"
#include "graphics/dx9/CDepthRenderTarget9.h"

namespace xeres {

	/*! 
		\class	COffscreenRenderTarget9
		\brief
	*/
	class COffscreenRenderTarget9 : public IRenderTarget
	{
	public:

		///	\ctor
		COffscreenRenderTarget9( RefWeak<CColorRenderTarget9> colorSuf , RefWeak<CDepthRenderTarget9> depthSurf );

		/// \dtor
		virtual ~COffscreenRenderTarget9( void );

		DECL_IOBJECT_CLASS( COffscreenRenderTarget9 , IRenderTarget );

	public:

		/// \name Render target interface.
		//@{

		/// \impl
		virtual bool OnLostDevice( void );

		/// \impl
		virtual bool OnResetDevice( RefWeak<IDevice> device );

		/// \impl
		virtual bool ApplyTarget( RefWeak<IDevice> device );

		//@}

	private:

		// @data
		Ref<CColorRenderTarget9>	m_colorSurf;
		Ref<CDepthRenderTarget9>	m_depthSurf;
	};
	
} // namespace xeres
